<?php setlocale(LC_TIME,NULL); ?>
<h3>
	Rekapitulasi Rekomendasi
	<?php echo strftime("%B",strtotime(@$results[0]['tgl_terbit_police']));?> <?php echo @$results[0]['tahun']?>
</h3>
<div style="float:right;margin-top:-45px">
	<a href="javascript: void(0)" onclick="window.open('<?php echo site_url()?>rekRekom/printData/<?php echo @$results[0]['bulan']?>/<?php echo @$results[0]['tahun']?>', 'windowname1', 'width=1024, height=700', 'scrollbars=1'); return false;" class="btn"><i class="icon-print"></i>&nbsp;Print</a>
</div>
<table class="table table-condensed table-hover" border="1">
	<thead>
		<th>No.</th>
		<!--th>Tgl. Terbit</th-->
		<th>No. Agenda</th>
		<th>Nama</th>
		<th>Tempat, Tanggal Lahir</th>
		<th>Alamat</th>
		<th>Keperluan</th>
	</thead>
	<tbody style="font-size:11px">
		<?php if (@$results):?>
			<?php $i=1;?>
			<?php foreach ($getTgl as $loopTgl):?>
				<tr>
					<td colspan="8" style="font-size:13px" >
						<strong><?php echo strftime("%d %B %Y",strtotime($loopTgl['tgl_terbit_police']))?></strong>
					</td>
				</tr>
				<?php foreach ($results as $row):?>
					<?php if ($loopTgl['tgl_terbit_police'] == $row['tgl_terbit_police']):?>
						<tr>
							<td><?php echo $i;?></td>
							<!--td><?php echo strftime("%d %B %Y",strtotime($row['tgl_terbit_police']))?></td-->
							<td><?php echo $row['no_agenda']?></td>
							<td><?php echo $row['nama_pengaju']?></td>
							<td><?php echo $row['tempat_lahir_pengaju']?>,<?php echo strftime("%d %B %Y",strtotime($row['tgl_lahir_pengaju']))?></td>
							<td><?php echo $row['alamat_pengaju']?></td>
							<td><?php echo $row['keperluan']?></td>
						</tr>
						<?php $i++;?>
					<?php endif?>
				<?php endforeach?>
			<?php endforeach?>
		<?php else:?>
			<tr>
				<td colspan="7">
					<br/>
					<div class="alert alert-error" style="text-align:center">
						Tidak ada record
					</div>
				</td>
			</tr>
		<?php endif?>
	</tbody>
</table>